import pandas as pd

data = {
    "name": ["lili","Mark","Jack","Tom"],
    "age": [18,19,20,21],
}
df = pd.DataFrame(data)

# 获取列数据
print(df["name"])
'''
0    lili
1    Mark
2    Jack
3     Tom
Name: name, dtype: object
'''

print(df["age"])
'''
0    18
1    19
2    20
3    21
Name: age, dtype: int64
'''